1. Field of the Invention
The present invention relates to a technique of transmitting voice signals through an IP (internet protocol) network by selecting a route according to an allowable delay time.
2. Description of the Related Art
Conventional voice transmission using a circuit switching network guarantees a bandwidth and a delay time. Voice transmission using an IP network, however, does not guarantee a bandwidth or a maximum delay time, and therefore, causes a problem of the quality of transmitted voice. It is known in the IP network voice transmission that an available bandwidth and a delay time vary depending on the delays in routers and gateways for relaying IP packets and on the congestion in transmission lines. Unlike general data transmission, voice or video transmission allows only a short delay time because voice or video data requires real-time transmission.
FIG. 1 shows static route selection in an internet telephone system. The system includes a gateway 10 serving the caller side to transmit voice, gateway 20 serving the receiver side to receive the voice, a circuit switching network 30, and route selection data 11 used by the gateway 10 on the caller side. A transmission terminal (not shown) makes a call. The call is received by the gateway 10, which relays the call to one of the gateways 20. When relaying the call to a destination telephone, the gateway 10 selects a route according to an IP address related to a destination phone number. At this time, the gateway 10 refers to the route selection data 11 that contains some routes provided with priority. If a route of the first priority is unavailable, the gateway 10 selects a route of the second priority, and so on. For example, the gateway 10 first selects a route (a) of the first priority from the route selection data 11 and relays the call to the gateway 20 as indicated with {circumflex over (1)}. If a return message from the gateway 20, passed as indicated by {circumflex over (2)}, indicates that a bandwidth is unavailable, the gateway 10 selects a route (b) of the second priority and relays the call to another gateway 20 as indicated with {circumflex over (3)}. If a return message from the gateway 20, passed as indicated by {circumflex over (4)}, indicates that a bandwidth is available, a call connection process will be completed.
Thereafter, the gateways 10 and 20 exchange voice compression rules available for the IP address related to the call, and the gateway 20 selects one of the rules. The selected rule is used between the gateway 10 on the caller side and the gateway 20 on the receiver side to compress and decompress voice data.
This prior art fixes IP addresses and routes for phone numbers in advance, and therefore, is unable to dynamically change routes from one to another. Namely, the prior art is unable to determine a route depending on a change in a delay time in an IP network 50, which will be explained later with reference to FIG. 2.
FIG. 2 shows dynamic route selection in an internet telephone system.
A gatekeeper 40 is provided for gateways 10 and 20. The gateways 10 and 20 periodically inform the gatekeeper 40 of bandwidth data. Upon receiving a call, the gateway 10 refers to the gatekeeper 40 as well as route selection data 11 and determines a route that involves an available bandwidth. Namely, the gateway 10 selects a route depending on dynamic changes in the conditions of the IP network 50.
The gateways 10 and 20 have each an address conversion function and a voice compression-decompression function. The address conversion function is used to relate a phone number in a circuit switching network 30 to an IP address in the IP network 50. The voice compression-decompression function effectively uses the bandwidths of the IP network according to voice compression rules shown. in Table 1.
Table 1 shows voice compression rules (part) standardized by ITU-T (International Telecommunication Union Telecommunication Standardization Sector). There are voice signal bandwidths of 5/6 Kbps, 8 Kbps, 16 Kbps, 48/56/64 Kbps, and 128 Kbps or over. A compression time becomes longer as the voice signal bandwidth becomes lower. Namely, if a long delay time is allowed, a route that involves a compression rule for a high compression rate can be selected.
FIG. 3 shows voice compression rules according to an H.323 protocol of ITU-T.
For a better understanding of the present invention, the H.323 protocol will be roughly explained. The details of the H.323 protocol are described in the eighth section xe2x80x9cCall Signaling Proceduresxe2x80x9d in pages 45 to 78 of ITU-T H.323 recommendation, September 1997.
The H.323 protocol is a title standard including a plurality of protocols as shown in FIG. 3. These protocols will be explained.
G.711 and G.723.1 are voice encoding protocols.
G.711 relates to PCM (pulse code modulation) and samples voice at 8 KHz to form encoded data of 64 Kbps.
G.723.1 forms encoded data of 5.3.Kbps (ACELP) or 6.3 Kbps (MP-MLQ).
H.261 is a protocol for encoding video data for a videoconference. There are CIF (common interface format) (288xc3x97352) and QCIF (quarter CIF).
H.225.0(RTP) (real time protocol) forms packets from voice and video streams and carries out synchronization based on time stamps.
H.225.0(RTCP) (real time control protocol) controls the RTP.
H.225.0(RAS) is a signal protocol between a terminal and a gatekeeper. According to this signal protocol, the gatekeeper certifies a connection request from the terminal.
H.225.0(Q.931) is a call control signal protocol based on Q.931.
H.245 transfers control signals between terminals. The control signals represent, for example, the performance of the terminals.
Each message has a logic channel and is described in ASN.1 syntax.
FIG. 4 shows basic H.323 protocol phases. Phase A is a call setup, phase B carries out initial communication and capability exchange, phase C establishes audiovisual communication, phase D is a call service, and phase E is a call termination.
a) Phase A: Setup
FIG. 5 shows call control messages based on H.225.0 exchanged between end points 1 and 2 in the call setup of the phase A. The end point 1 transmits a message with an IP address to the end point 2. The end point 2 returns a call proc. message, an alert message, or a connect message each containing an H.245 control channel address used for H.245 signaling to the end point 1. Then, the phase A ends.
b) Phase B: Initial Communication and Capability
The phase B sets an H.245 control channel. The H.245 control channel is used to open a media channel and exchange transmission capabilities between the end points 1 and 2. As an option, the end point 2 on the receiver side may set an H.245 control channel when receiving a setup message, or the end point 1 on the caller side may set an H.245 control channel when receiving the alerting or call proc. message. Basic messages will be explained.
An H.245 TerminalCapabilitySet message is used to exchange capabilities between terminals.
An H.245 MasterSlaveDetermination message is used to determine a master between two terminals according to a random number.
According to the H.323 protocol, a caller terminal sends a TerminalCapabilitySet message to a receiver terminal to inform the receiver terminal of a terminal capability. If the terminal capability is acceptable, the receiver terminal returns a TerminalCapabilityAck message to the caller terminal. The exchange of terminal capabilities may be carried out any time. For this purpose, a TCP channel for an H.245 control channel must be set in advance.
c) Phase C: Establishment of Audiovisual Communication
The phase C sets logic channels for various pieces of data after the transmission capability exchange and master/slave determination. Voice and video data are transmitted according to a TSAP ID (transport layer service access point ID, i.e., a UDP port number) by using the channel set in the H.245 setup phase. The attributes of the channels can be changed during communication as follows:
(1) Mode change
The structure, capability, reception mode, etc., of a channel are changeable.
(2) Media stream address distribution
There are messages used to transmit addresses for setting logic channels between terminals. These messages will be explained.
An H.245 openLogicalChannel message carries a caller logical channel number and a channel setting request.
An H.245 openLogicalChannelAck message carries a receiver logical channel number.
d) Phase D: Call Service
The phase D provides bandwidth change and status services. These services will be explained.
i) Bandwidth change
A bandwidth is changeable according to a request from an H.323 terminal. There are sequences for a channel change on the caller side and a channel change on the receiver side. The destination of the request is a gatekeeper.
An H.225.0 BRQ (bandwidth change request) message is used to make a request to a gatekeeper for a bandwidth change.
An H.225.0 BRJ (bandwidth change reject) message is used by the gatekeeper to reject the bandwidth change request.
An H.225.0 BCF (bandwidth change confirm) message is used by the gatekeeper to accept the bandwidth change request.
An H.245 CloseLogicalChannel message is used to discard a logic channel before a bandwidth change.
An H.245 OpenLogicalChannel message is used to set a logic channel of a requested bandwidth.
An H.245 OpenLogicalChannelAck message is used to inform of a result of resetting a logic channel.
An H.245 FlowControlCommand message is used to make a receiver set a logic channel whose bandwidth is changed.
ii) Status
There are messages used by a gatekeeper to monitor the operating states and failures of terminals.
An H.225.0 information request message is used by a gatekeeper to request the statuses of terminals.
An H.225.0 information request response message is used to return the bandwidth and type of a terminal in response to a request from a gatekeeper.
e) Phase E: Call Termination
The phase E is a call termination sequence. It closes video, data, and voice channels in this order. If there is a gatekeeper, a caller uses an H.245 EndSessionCommand message. If there is no gatekeeper, an H.225 release complete message is transmitted to terminate a call.
As explained above, the longer a delay time, the lower the quality of the transmitted voice. The present invention finds an end-to-end delay time and, according to the delay time, selects a proper route to improve the quality of voice to be transmitted.
FIG. 6 shows an end-to-end delay time in an internet telephone system. The delay time mainly consists of a network delay time, a device delay time, and a voice compression or decompression delay time. The total of the three delay times is a total delay time or an end-to-end delay time. A route A involves a total delay time that exceeds an allowable delay time, and therefore, is not selectable as a route for transmitting voice. A route B involves a compression or decompression delay time that is shorter than that of the route A and a total delay time that is within the allowable delay time. Accordingly, the route B can be used as a route for transmitting voice. A route that has a total delay time within the allowable delay time can be found by calculating the total delay time according to a voice compression rule employed by the route.
The gatekeeper 40 of FIG. 2 receives bandwidth data from each of the gateways 10 and 20 at regular intervals. The collecting the bandwidth data at regular intervals, however, is not in real time. As a result, data used by the gatekeeper 40 to handle a connection request deviates from actual data. For example, a bandwidth that seems to be available may actually be unavailable. When selecting a route, the prior art of FIG. 2 only compares a bandwidth required for transmitting compressed voice with available bandwidths. Namely, the prior art pays no attention to an end-to-end delay including compression and decompression delays. As a result, the end-to-end delay sometimes exceeds an allowable delay set for a call. In this case, even if the call is successfully connected, voice packets related to the call will be intermittently discarded due to the delay exceeding the allowable delay time, to deteriorate the quality of the transmitted voice.
An object of the present invention is to provide a gateway having a function of measuring a total delay time, selecting a voice compression rule accordingly, and selecting a route accordingly. In the following explanation, xe2x80x9ccompression/decompression allowancexe2x80x9d means an allowable compression or decompression time.
In order to accomplish the object, a first aspect of the present invention provides a method of selecting a route for transmitting voice through gateways connected to the Internet. The method includes the steps of multicasting a connection request from a caller gateway to receiver gateways along routes that run through the caller and receiver gateways, receiving at the caller gateway responses to the connection request from the receiver gateways, calculating, at the caller gateway, a compression/decompression allowance of each of the receiver gateways according to the responses, and selecting one of the routes that employs a compression rule whose compression or decompression time is shorter than the compression/decompression allowance of the corresponding receiver gateway.
Based on the method of the first aspect, a second aspect of the present invention includes the steps of finding a network delay time and a device delay time of each of the receiver gateways according to the responses, calculating the sum of the network delay time and device delay time of each receiver gateway, and calculating the compression/decompression allowance of each receiver gateway by subtracting the calculated sum from a preset allowable delay time.
Based on the method of the first and second aspects, a third aspect of the present invention includes the step of selecting one of the routes that employs a compression rule whose compression or decompression time is shorter than the corresponding compression/decompression allowance and provides the best transmission quality.
Based on the method of the first to third aspects, a fourth aspect of the present invention includes the steps of calculating a maximum delay time of each of the routes according to the responses and not carrying out a connection if none of the maximum delay times is below a threshold.
A fifth aspect of the present invention provides a gateway apparatus for transmitting voice through an IP network. The apparatus has a unit for multicasting a connection request to receiver gateways along routes running through the receiver gateways, a unit for receiving responses to the connection request from the receiver gateways, a unit for finding a network delay time and a device delay time of each of the receiver gateways according to the responses, calculating the sum of the network delay time and device delay time of each receiver gateway, and calculating a compression or decompression time of each receiver gateway by subtracting the calculated sum from a preset allowable delay time, and a unit for selecting one of the routes that employs a compression rule whose compression or decompression time is shorter than the calculated compression or decompression time of the corresponding receiver gateway.
Based on the gateway apparatus of the fifth aspect, a sixth aspect of the present invention does not carry out a connection if there is no receiver gateway whose sum of the network delay time, device delay time, and compression or decompression time is below a threshold.
Based on the gateway apparatus of the fifth and sixth aspects, a seventh aspect of the present invention selects a route that employs a compression rule whose compression or decompression time is shorter than the compression or decompression time of the corresponding receiver gateway and provides the best transmission quality.
The ITU-T does not clearly standardize individual processing times of compression and decompression, and therefore, the present invention considers that the compression and decompression times are substantially equal to each other. If they differ from each other, a longer one is employed as a compression or decompression time. Consequently, there are a network delay time, a device delay time, and a compression or decompression delay time as shown in FIG. 6.
With these methods and apparatuses, the present invention solves the problems of the prior arts.